Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.5.0 #3059

Merged
merged 1 commit into from
Sep 23, 2022
Merged

v0.5.0 #3059

merged 1 commit into from
Sep 23, 2022

Conversation

zurfyx
Copy link
Member

@zurfyx zurfyx commented Sep 23, 2022

To copy-paste onto release note:

20 days since our past release. Is Lexical dead? ☠️

Not quite, we've been busy working on this meaty 0.5 release that we hope you'll enjoy. (Side note: Lexical nightly versions coming soon, more info below).

Draggable blocks

One of the most beloved features of Notion is the ability to seamlessly move blocks within the same document. @LuciNyan has ported this behavior to Lexical under the DraggableBlockPlugin name. You can check it out in our playground!

2022-09-14.23.41.11.mov

LexicalTablePlugin makes its way to Meta production

We started our tables (@lexical/react/LexicalTablePlugin) development at the start of the year, one of the most ambitious and complex plugins we have built for rich text. We have blocked a good amount of time during this past month to work with multiple internal teams to identify and squash most of these (10+) high-pri bugs that make the experience unideal and we believe they are now in a good shape to meet their first internal users.

Screen Shot 2022-09-23 at 3 08 54 pm

Shadow Root

We have introduced a new advanced concept for Lexical ElementNodes: [Shadow Root](https://lexical.dev/docs/api/classes/lexical.ElementNode#isshadowroot). A Shadow Root is a Node that behaves like a root (we stole the name from Shadow DOM). This method enables you to have complex deep rich text hierarchies where children node shouldn't see beyond the parent. For example, the cell node content.

$insertNodes with NodeSelection and GridSelection support

We introduced a seamless way to handle node insertion. We bundled {rangeSelection/nodeSelection/gridSelection}.insertNode into just one method: $insertNodes. We also added insertNodes support for NodeSelection and GridSelection that was previously not supported.

Screen.Recording.2022-07-13.at.3.37.18.pm.mov

Various API changes

  1. PlainTextPlugin and RichTextPlugin will no longer take an initialEditorState. We found that this is unintuitive to handle nested editors and harder to control SSR-enabled pages. Instead, MLCComposer will take and apply the initialEditorState on editor creation
  2. We killed INERT nodes. We found them cumbersome to use, not accessible and they didn't meet the requirements for our one and only use case (AutocompletePlugin) where private node data is required. Instead, the recommended approach for now is to use a DecoratorNode.
  3. We deprecated the Grid API. The future of the Grid API is uncertain but if there's something we know is that it isn't a good fit in the lexical package, it serves a very specific use case and it's redundant for plain text.
  4. Killed isTopElement in favor for isInline on ElementNodes to reflect what they do better.
  5. And some more (see [0.5] prefixed in the list below)..

Lots of bugfixes

  • Formatting, composition, MD, etc. (see list below for a complete list

Release automation: nightly releases

We listened to your (mostly Discord) feedback, you want to have the latest, more frequently, especially when some of you are heavily involved into the development and growth of the Lexical framework.

The reality is, we didn't choose to postpone releases for 2 weeks. It has mostly been a lack of automation and making sure we bundle breaking API changes to avoid developer churn.

We know that there's no one-size-fits-all when it comes to developers, and that's why we want to offer different ways to play with the library, what we have now, a slow-ish but less time-consuming (for you) release cycle but also offer nightly releases that would happen automatically once per day and would include the very latest of the development.

The work is still under development but we plan to start this soon, stay tuned!

Changelog

@vercel
Copy link

vercel bot commented Sep 23, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
lexical ✅ Ready (Inspect) Visit Preview Sep 23, 2022 at 6:33PM (UTC)
lexical-playground ✅ Ready (Inspect) Visit Preview Sep 23, 2022 at 6:33PM (UTC)

@fantactuka
Copy link
Contributor

Amazing summary @zurfyx 👏👏👏

@zurfyx zurfyx merged commit e85a7c5 into main Sep 23, 2022
acywatson pushed a commit that referenced this pull request Oct 18, 2022
thegreatercurve pushed a commit that referenced this pull request Nov 25, 2022
@trueadm trueadm deleted the 0.5.0 branch December 18, 2022 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants